//
//  ZCSingerContentTableViewCell.m
//  VoiceMusic
//
//  Created by dllo on 15/10/23.
//  Copyright © 2015年 zhangdeyu. All rights reserved.
//

#import "ZCSingerContentTableViewCell.h"
#import <Masonry.h>
#import "ZCBaseLabel.h"
#import "ZCBaseView.h"
#import <UIImageView+WebCache.h>
@implementation ZCSingerContentTableViewCell
- (void)layoutSubviews
{
    [self superview];
    [self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
    [self.backView setBackgroundColor:[UIColor whiteColor]];
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.backView).offset(0);
        make.left.equalTo(self.backView).offset(5);
        make.width.equalTo(@(self.contentView.bounds.size.width / 2));
        make.height.equalTo(@50);
    }];
    [self.titleLabel setFont:[UIFont boldSystemFontOfSize:18]];
    [self.titleLabel setTextColor:[UIColor blackColor]];
    
    [self.detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.titleLabel.mas_bottom).offset(0);
        make.left.equalTo(self.backView).offset(5);
        make.width.equalTo(@(self.contentView.bounds.size.width / 2));
        make.bottom.equalTo(self.backView).offset(5);
    }];
    
    [self.firstLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.backView).offset(25);
        make.left.equalTo(self.titleLabel.mas_right).offset(5);
        make.right.equalTo(self.backView).offset(5);
        make.bottom.equalTo(self.backView).offset(-25);
    }];
    [self.firstLabel setFont:[UIFont systemFontOfSize:14]];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (void)getInfo:(ZCSingerMusicModel *)model
{
    [self.titleLabel setText:model.name];
    NSLog(@"---------------%@", model.name);
    [self.detailLabel setText:model.singerName];
    NSString *str = [NSString stringWithFormat:@"出自专辑--(%@)", model.albumName];
    [self.firstLabel setText:str];
}
@end
